<?php
class main extends admin{
    public function __construct(){
        parent::__construct();
    }
    
    public function index(){
        $tpl=$this->Template();
        $total_num_user = db()->getOne("SELECT count(*) FROM x_user");//用户总数量;
        $sign_up_user = db()->getOne("SELECT count(*) FROM x_baoming");//报名总人数;
        $order_total  = db()->getOne('SELECT count(*) FROM x_order');   //订单总数;
        $free_trial   = db()->getOne("SELECT count(*) FROM x_huif");//免费试学;
        $jx_num   = db()->getOne("SELECT count(*) FROM x_jiaxiaoinfo");//驾校数量;
        $jl_num   = db()->getOne("SELECT count(*) FROM x_user WHERE user_type=2");//教练数量;
        $tpl->assign('total_num_user',$total_num_user);
        $tpl->assign('sign_up_user',$sign_up_user);
        $tpl->assign('order_total',$order_total);
        $tpl->assign('free_trial',$free_trial);
        $tpl->assign('jx_num',$jx_num);
        $tpl->assign('jl_num',$jl_num);
        $tpl->display('main');
    }  
    
}